#ifndef CCONTACTPROTOTYPE_H
#define CCONTACTPROTOTYPE_H

#include <vectorMaths.h>
#include <memory>
#include <string.h>

namespace NApiFea
{
    /** 
     * Data storage class for transmitting contact information via the coupling interface. Stores positions,
     * forces ... that sort of thing. Represents a single particle -> (geom or particle) contact 
     */
    class CContactPrototype
    {
    public:
        CContactPrototype() :
            m_contactID(-1),
            m_position(0.0, 0.0, 0.0),
            m_normalForce(0.0, 0.0, 0.0),
            m_tangentialForce(0.0, 0.0, 0.0),
            m_normalOverlap(0.0),
            m_physicalOverlap(0.0),
            m_tangentialOverlap(0.0, 0.0, 0.0)
        {
           
        }

        CContactPrototype(unsigned int contactID,
                          NApiEDEM::C3dValue position,
                          NApiEDEM::C3dValue normalForce,
                          NApiEDEM::C3dValue tangentialForce,
                          double normalOverlap,
                          double physicalOverlap,
                          NApiEDEM::C3dValue tangentialOverlap)
        {
            m_contactID = contactID;
            m_position = position;
            m_normalForce = normalForce;
            m_tangentialForce = tangentialForce;
            m_normalOverlap = normalOverlap;
            m_physicalOverlap = physicalOverlap;
            m_tangentialOverlap = tangentialOverlap;
        }

        CContactPrototype(const CContactPrototype& element)
        {
            *this = element;
        }

        ~CContactPrototype() { }

        unsigned int getContactID() const { return m_contactID; }
        void setContactID(unsigned int contactID) { m_contactID = contactID; }

        const NApiEDEM::C3dValue& getPosition() { return m_position; }
        void setPosition(const NApiEDEM::C3dValue& position) { m_position = position; }

        const NApiEDEM::C3dValue& getNormalForce() { return m_normalForce; }
        void setNormalForce(const NApiEDEM::C3dValue& normalForce) { m_normalForce = normalForce; }

        const NApiEDEM::C3dValue& getTangentialForce() { return m_tangentialForce; }
        void setTangentialForce(const NApiEDEM::C3dValue& tangentialForce) { m_tangentialForce = tangentialForce; }

        double getNormalOverlap() const { return m_normalOverlap; }
        void setNormalOverlap(double normalOverlap) { m_normalOverlap = normalOverlap; }

        double getPhysicalOverlap() const{ return m_physicalOverlap; }
        void setPhysicalOverlap(double physicalOverlap) { m_physicalOverlap = physicalOverlap; }

        const NApiEDEM::C3dValue& getTangentialOverlap() { return m_tangentialOverlap; }
        void setTangentialOverlap(const NApiEDEM::C3dValue& tangentialOverlap) { m_tangentialOverlap = tangentialOverlap; }

    protected:
        unsigned int m_contactID;
        NApiEDEM::C3dValue m_position;
        NApiEDEM::C3dValue m_normalForce;
        NApiEDEM::C3dValue m_tangentialForce;
        double m_normalOverlap;
        double m_physicalOverlap;
        NApiEDEM::C3dValue m_tangentialOverlap;
    };
}

#endif
